com.borneo.ftp
Class FtpConnectionMgr
java.lang.Object
|
+--com.borneo.ftp.FtpConnectionMgr
- All Implemented Interfaces:
- Connectable
- public class FtpConnectionMgr
- extends java.lang.Object
- implements Connectable
Coded in the properties file for the type of Network connection to be used, this
class implements the interface Connectable and is responsible for getting the
connection to an FTP Server and for calling the high level methods that will process
the work to move files as coded in the XML nodes underneath ExchangeSession.
Field Summary |
static ExchangeSession |
exchangeSession
Object corresponds to XML node and contains the properties that describe the file
moving work that needs to be done over an FTP connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
exchangeSession
public static ExchangeSession exchangeSession
- Object corresponds to XML node and contains the properties that describe the file
moving work that needs to be done over an FTP connection.
FtpConnectionMgr
public FtpConnectionMgr()
- Creates new FtpConnectionMgr
newConnection
public FileExchangeConnection newConnection(ExchangeSession arg)
- get a connection
- Specified by:
newConnection
in interface Connectable
- Parameters:
arg
- contains the attributes ( ip address, user , password ) for getting the network connection.- Returns:
- FtpConnection instance
getExchangeSession
public ExchangeSession getExchangeSession()
- getter
- Returns:
- an ExchangeSession instance
setExchangeSession
public static void setExchangeSession(ExchangeSession arg)
- setter
- Parameters:
arg
- an instance of ExchangeSession
fileAssociationEntries
public void fileAssociationEntries(FileExchangeConnection connection)
- As per the rules in the DTD for the FTP XML, an ExchangeSession consists of 1 or more
FileAssociation nodes. This method unwraps the collection of FileAssociation instances,
calling processFiles on each.
- Specified by:
fileAssociationEntries
in interface Connectable
- Parameters:
connection
- the connection is passed in because it knows how to process files over and FTP connection